<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Certificate
 *
 * @property int $id
 * @property int|null $exhibitor_information_id
 * @property string|null $name
 * @property string|null $phone
 * @property string|null $e_mail
 * @property string|null $code
 * @property int|null $type_id
 *
 * @package App\Models
 */
class Certificate extends Model
{
    protected $table = 'certificates';
    public $timestamps = false;

    protected $casts = [
        'exhibitor_information_id' => 'int',
        'type_id' => 'int'
    ];

    protected $fillable = [
        'exhibitor_information_id',
        'name',
        'phone',
        'e_mail',
        'code',
        'type_id'
    ];

    public function exhibitor_information()
    {
        return $this->belongsTo(ExhibitorInformation::class, 'exhibitor_information_id', 'id');
    }
}
